package com.spt.springbootzhsx.dao;

import com.spt.springbootzhsx.entity.back.AdminBack;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

@Mapper
public interface AdminDao {


    @Select("select rpid,admin.aid,aname,password,admin_role.arid,name,decription,addTime,permission.pid,grade,desn " +
            "from admin,admin_role,admin_role_relative,permission,role_permission_relative " +
            "where admin.aid=admin_role_relative.aid and admin_role.arid=admin_role_relative.arid and rpid=permission.pid and role_permission_relative.arid=admin_role.arid and admin.aid=#{aid}")
    ArrayList<AdminBack> getAdminAllInfoByAid(Integer aid);
}
